extends "../aijier-2/aijier-2.gd"

func _extInit():
	._extInit()
	if isInManual():
		addSkill(sk2t1[1], sk2t1[0])
		addSkill(sk2t2[1], sk2t2[0])
	elif sk2 != 0:
		doChoiceSkill2()
	lv = 3             #等级的设置

var sk2t1 = ["映照之渊·1", "每秒只会受到不超过3次伤害，每过8秒，每秒可受伤次数+1"]
var sk2t2 = ["映照之渊·2", "每秒只会受到不超过6次伤害"]

func doChoiceSkill2():
	var sk = get("sk2t%d"%sk2)
	addSkill(sk[1], sk[0])

func _onHurt(atkInfo):
	._onHurt(atkInfo)
	if atkInfo.hurtVal <= 0 or atkInfo.virtual or atkInfo.isMiss:return
	if hurtCount >= hurtNumLimit:
		atkInfo.virtual = true
	hurtCount += 1
	
func _onBattleStart():
	._onBattleStart()
	hurtNumLimit = 3
	if sk2 == 2:
		hurtNumLimit = 6

var count = 0
var hurtNumLimit = 3
var hurtCount = 0
func _upS():
	._upS()
	hurtCount = 0
	if sk2 == 2:return
	count += 1
	if count >= 8:
		count = 0
		hurtNumLimit += 1